Skip to content

Updating ultrajson#1

Open
WilliamBinquet wants to merge 783 commits into
optimdata:masterfrom
ultrajson:main
Open

Updating ultrajson#1
WilliamBinquet wants to merge 783 commits into
optimdata:masterfrom
ultrajson:main

Conversation

@WilliamBinquet

Copy link
Copy Markdown

No description provided.

hugovk and others added 30 commits July 25, 2022 21:21
Infinity was being encoded as 'Inf' which, whilst the JSON spec doesn't include
any non-finite floats, differs from the conventions in other JSON libraries,
JavaScript of using 'Infinity'. It also differs from what `ujson.loads()`
expects so that `ujson.loads(ujson.dumps(math.inf))` raises an exception.

Closes #80.
updates:
- [github.com/asottile/pyupgrade: v2.34.0 → v2.38.2](asottile/pyupgrade@v2.34.0...v2.38.2)
- [github.com/psf/black: 22.6.0 → 22.8.0](psf/black@22.6.0...22.8.0)
- [github.com/PyCQA/flake8: 4.0.1 → 5.0.4](PyCQA/flake8@4.0.1...5.0.4)
Doing so allows for building on webassembly. Officially declareing support for WASM
however will have to wait until pyodide/pytest-pyodide#59 is
merged to facilitate testing WASM compatibility.
Due to a bug in PyPy [1], PyObject_GetBuffer() fails to detect non C
contiguous inputs. Allowing ujson.loads() to run on non-contiguous
buffers such as a strided NumPy array would lead to mayhem. Approximate
the intention of PyObject_GetBuffer() by explicitly checking that the
input is within the set of common bytes-like objects known to be
unconditionally C contiguous.

- [1]: https://foss.heptapod.net/pypy/pypy/-/issues/3872
updates:
- [github.com/asottile/pyupgrade: v2.38.2 → v3.3.1](asottile/pyupgrade@v2.38.2...v3.3.1)
- [github.com/psf/black: 22.8.0 → 22.12.0](psf/black@22.8.0...22.12.0)
- [github.com/PyCQA/isort: 5.10.1 → 5.11.4](PyCQA/isort@5.10.1...5.11.4)
- [github.com/PyCQA/flake8: 5.0.4 → 6.0.0](PyCQA/flake8@5.0.4...6.0.0)
- [github.com/pre-commit/pre-commit-hooks: v4.3.0 → v4.4.0](pre-commit/pre-commit-hooks@v4.3.0...v4.4.0)
renovate Bot and others added 30 commits May 1, 2026 01:47
Improves unit test coverage without any code changes. This should help
identify any breaking behavior for future PRs.
* Add missing dec-refs for if PyTuple_Pack() or writing the payload to
  file fails

* Add missing bailout for failed PyTuple_Pack()

* Add tests for all but the PyTuple_Pack() failing (which requires
  inducing a malloc() failure)
Only needed if the current ujson fork is private.
There's some graalpy + virtalenv issue inside cibuildwheel and it
doesn't look like we can do anything about it.
Given that it's impossible to even describe what serialising a
concurrently mutating object is supposed to do, this is as far as I
think is useful or feasible to go towards supporting it (#684/#689).
Increasing the bug/CVE surface to include allowing any object to
metamorph in any way at any time is really not what this code base
needs.
* Fix off by one errors in detecting end of string mid sequence
* Add missing check for codepoints > max unicode
* Add missing check for bad continuation bytes
GraalPy's str.decode() error spells utf-8 as utf_8.

Also add testing on ubuntu+graalpy to CI
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.